package chartor;

import java.awt.Point;
import java.awt.Rectangle;

public abstract class Gun {
	public final int JUJI=2;
	public final int CHONGFENG=1;
	public final int SANGDAN=3;
private int speed;
private int damage;
private Rectangle manRectangle;
private int w;
private int h;
private int number;
private int Maxnumber;
private String nameString;
public Jingdutiao jindutiao;//进度条
private int rl;//装弹速度
private Boolean cool;//冷却时间
public int getW() {
	return w;
}
public void setW(int w) {
	this.w = w;
}
public int getH() {
	return h;
}
public void setH(int h) {
	this.h = h;
}
public abstract void tututu(int state,Point target);
public Gun(int s,int d,Rectangle p,int w,int h,int r,String name) {
	// TODO Auto-generated constructor stub
	this.speed=s;
	this.damage=d;
	this.manRectangle=p;
	this.w=w;
	this.h=h;
	this.rl=r;
	this.nameString=name;
}
public int getSpeed() {
	return speed;
}
public void setSpeed(int speed) {
	this.speed = speed;
}
public int getDamage() {
	return damage;
}
public void setDamage(int damage) {
	this.damage = damage;
}
public int getNumber() {
	return number;
}
public void setNumber(int number) {
	this.number = number;
}
public int getMaxnumber() {
	return Maxnumber;
}
public void setMaxnumber(int maxnumber) {
	Maxnumber = maxnumber;
}
public boolean getCool() {
	return cool;
}
public void setCool(Boolean cool) {
	this.cool = cool;
}
public int getRl() {
	return rl;
}
public void reload() {
	// TODO Auto-generated method stub
	this.jindutiao=new Jingdutiao(getRl(), this);
	jindutiao.start();
}
public abstract void load();
public void setRl(int rl) {
	this.rl = rl;
}
public String getNameString() {
	return nameString;
}
public void setNameString(String nameString) {
	this.nameString = nameString;
}
public Rectangle getManRectangle() {
	return manRectangle;
}
public void setManRectangle(Rectangle manRectangle) {
	this.manRectangle = manRectangle;
}
}
